package pokemon;

import java.io.FileNotFoundException;
import java.util.ArrayList;

public class Driver
{
	
	public static void main(String[] args) throws FileNotFoundException
	{
		//Fix up in the read in the part with the the ifs for making intial db.
		//parallelization?
		DataReader read = new DataReader();
		Pokedex.populateList();
		Pokedex dex = read.makeDex();
//		Pokemon poke = dex.getPokemon("bisharp");
//		ArrayList<String> tiers = new ArrayList<String>();
//		tiers.add("OU");
//		tiers.add("BL");
//		//tiers.add("UBERS");
//		//tiers.add("UU");
//		Pokedex newDex = dex.newPokedexWithTiers(tiers);
//		Synergizer syn = new Synergizer(poke, newDex);
//		//It crashes if something isn't in the tier list but should be, or the other way around.
//		System.out.println(poke);
//		System.out.println(poke.getWeaknessesX2());
//		System.out.println(poke.getWeaknessesX4());
//		System.out.println(syn.getPartners());
//		
		
		
		//Mystery of the dissapearing vaporeon.... Your tier lists doesn't add both versions.
		/* @Daniel - this is not the case, my code tier code isn't called at this point and the result of the following line is:
		 * Vaporeon WATER VOID Hydration 130 65 60 110 95 65
		 * Therefore it was not given the other ability and read.makeDex() is where the issue lies.
		 */
		//@Jon. Incorrect!
		
//		GUI gui = new GUI(dex);
//		
//		gui.setVisible(true); 
//		gui.setSize(gui.getMaximumSize().height/2, gui.getMaximumSize().width/2);
//		gui.repaint();
//		
		

		ArrayList<String> tiers = new ArrayList<String>();
		tiers.add("OU");
		tiers.add("UU");	
		tiers.add("BL");
		//tiers.add("BL2");
		//tiers.add("Limbo");
		Pokedex newDex = dex.newPokedexWithTiers(tiers);
		for(Pokemon p:newDex)
		{
			if(p == null)
				System.out.println("null");
		}
		Pokemon poke = dex.getPokemon("Salamence");
		Synergizer syn = new Synergizer(poke, newDex);
		System.out.println(syn.getPartners());
		//System.out.println(syn.oneWaySynergize(poke, dex.getPokemon("politoed")));
		//System.out.println(syn.oneWaySynergize(poke, dex.getPokemon("vaporeon")));
		//System.out.println(syn.oneWaySynergize(poke, dex.getPokemon("bronzong")));
		
//		Synergizer syn2 = new Synergizer(poke, newDex);
//		for(Pokemon[] p: syn2.createTeam())
//		{
//			for(int i=0;i<6;i++)
//			{
//				System.out.print(p[i].name);
//			}
//			System.out.println();
//		}

	}
}
